<aside class="admonition warning">
  <p>This page describes manually installing Trilium on your server. <strong>Note that this is a not well supported way to install Trilium, problems may appear, information laid out here is quite out of date. It is recommended to use either</strong>&nbsp;
    <a
    class="reference-link" href="#root/_help_rWX5eY045zbE">Docker Server Installation</a>&nbsp;<strong>or</strong>&nbsp;<a class="reference-link"
      href="#root/_help_3tW6mORuTHnB">Packaged server installation</a><strong>.</strong>
  </p>
</aside>
<h2>Requirements</h2>
<p>Trilium is a node.js application. Supported (tested) version of node.js
  is latest 14.X.X and 16.X.X. Trilium might work with older versions as
  well.</p>
<p>You can check your node version with this command (node.js needs to be
  installed):</p><pre><code class="language-text-x-trilium-auto">node --version</code></pre>
<p>If your Linux distribution has only an outdated version of node.js, you
  can take a look at the installation instruction on node.js website, which
  covers most popular distributions.</p>
<h3>Dependencies</h3>
<p>There are some dependencies required. You can see command for Debian and
  its derivatives (like Ubuntu) below:</p><pre><code class="language-text-x-trilium-auto">sudo apt install libpng16-16 libpng-dev pkg-config autoconf libtool build-essential nasm libx11-dev libxkbfile-dev</code></pre>
<h2>Installation</h2>
<h3>Download</h3>
<p>You can either download source code zip/tar from <a href="https://github.com/TriliumNext/Trilium/releases/latest">https://github.com/TriliumNext/Trilium/releases/latest</a>.</p>
<p>For the latest version including betas, clone Git repository <strong>from</strong>  <code>main</code>  <strong>branch</strong> with:</p><pre><code class="language-text-x-trilium-auto">git clone -b main https://github.com/triliumnext/trilium.git</code></pre>
<h2>Installation</h2><pre><code class="language-text-x-trilium-auto">cd trilium

# download all node dependencies
npm install

# make sure the better-sqlite3 binary is there
npm rebuild

# bundles &amp; minifies frontend JavaScript
npm run webpack</code></pre>
<h2>Run</h2><pre><code class="language-text-x-trilium-auto">cd trilium

# using nohup to make sure trilium keeps running after user logs out
nohup TRILIUM_ENV=dev node src/www &amp;</code></pre>
<p>The application by default starts up on port 8080, so you can open your
  browser and navigate to <a href="http://localhost:8080">http://localhost:8080</a> to
  access Trilium (replace "localhost" with your hostname).</p>
<h2>TLS</h2>
<p>Don't forget to <a href="#root/_help_l2VkvOwUNfZj">configure TLS</a> which
  is required for secure usage!</p>